package top.wu2020.lazy.ws.chat.domain.model.community;

import org.wu.framework.web.response.Result;
import org.wu.framework.web.response.ResultFactory;
import org.springframework.beans.factory.annotation.Autowired;
import top.wu2020.lazy.ws.chat.domain.model.community.Community;
import java.util.List;
import org.wu.framework.lazy.orm.database.lambda.domain.LazyPage;
/**
 * describe community 
 *
 * @author Jia wei Wu
 * @date 2024/05/24 08:52 晚上
 * @see org.wu.framework.lazy.orm.core.persistence.reverse.lazy.ddd.DefaultDDDLazyDomainRepository 
 **/

public interface CommunityRepository {


    /**
     * describe 新增
     *
     * @param community 新增     
     * @return {@link  Result<Community>} 新增后领域对象     
     
     * @author Jia wei Wu
     * @date 2024/05/24 08:52 晚上
     **/

    Result<Community> story(Community community);

    /**
     * describe 批量新增
     *
     * @param communityList 批量新增     
     * @return {@link Result<List<Community>>} 新增后领域对象集合     
     
     * @author Jia wei Wu
     * @date 2024/05/24 08:52 晚上
     **/

    Result<List<Community>> batchStory(List<Community> communityList);

    /**
     * describe 查询单个
     *
     * @param community 查询单个     
     * @return {@link Result<Community>} DTO对象     
     
     * @author Jia wei Wu
     * @date 2024/05/24 08:52 晚上
     **/

    Result<Community> findOne(Community community);

    /**
     * describe 查询多个
     *
     * @param community 查询多个     
     * @return {@link Result<List<Community>>} DTO对象     
     
     * @author Jia wei Wu
     * @date 2024/05/24 08:52 晚上
     **/

    Result<List<Community>> findList(Community community);

    /**
     * describe 分页查询多个
     *
     * @param size 当前页数
     * @param current 当前页
     * @param community 分页查询多个     
     * @return {@link Result<LazyPage<Community>>} 分页领域对象     
     
     * @author Jia wei Wu
     * @date 2024/05/24 08:52 晚上
     **/

    Result<LazyPage<Community>> findPage(int size,int current,Community community);

    /**
     * describe 删除
     *
     * @param community 删除     
     * @return {@link Result<Community>}      
     
     * @author Jia wei Wu
     * @date 2024/05/24 08:52 晚上
     **/

    Result<Community> remove(Community community);

    /**
     * describe 是否存在
     *
     * @param community 是否存在     
     * @return {@link Result<Boolean>} 是否存在     
     
     * @author Jia wei Wu
     * @date 2024/05/24 08:52 晚上
     **/

    Result<Boolean> exists(Community community);

}